<include file="public/layout" />
<script src="__ROOT__/public/static/js/layer/laydate/laydate.js"></script>
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
	<div class="fixed-bar">
		<div class="item-title">
			<div class="subject">
				<h3>工单记录管理</h3>
				<h5>网站系统工单记录管理</h5>
			</div>
		</div>
	</div>
	<!-- 操作说明 -->
	<div id="explanation" class="explanation" style="color: rgb(44, 188, 163); background-color: rgb(237, 251, 248); width: 99%; height: 100%;">
		<div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
			<h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
			<span title="收起提示" id="explanationZoom" style="display: block;"></span>
		</div>
		<ul>
			<li>工单记录设置管理.</li>
		</ul>
	</div>
	<div class="flexigrid">
		<div class="mDiv">
			<div class="ftitle">
				<h3>工单记录管理列表</h3>
				<div class="fbutton">
					<a href="{:U('Admin/Invoice/workOrder')}">
						<div class="up" title="返回会员列表">
							<span><i class="fa fa-level-up"></i>返回工单列表</span>
						</div>
					</a>
				</div>
			</div>
			<a href=""><div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div></a>
		</div>
		<div class="hDiv">
			<div class="hDivBox">
				<form>
					<input type="hidden" id="user_id" name="user_id" value="{$prom_list.user_id}" />
					<input type="hidden" id="wid" name="wid" value="{$prom_list.id}" />
				</form>
				<table cellspacing="0" cellpadding="0">
					<thead>
					<ul style="margin-top: 20px">
						<li align="left" style="font-size:19px;">
							{$prom_list.nickname}：{$prom_list.description}<br/><span style="font-size: 15px;">({$prom_list.add_time})</span>
						</li>
					</ul>
					<foreach name="work" item="vo" key="k" >
					<ul style="margin-top: 20px">
						<li align="left" style="font-size:19px;">
							<if condition="$vo.user_id neq 0">{$vo.nickname}：<else/>邦尼德：</if>{$vo.comment}<br/><span style="font-size: 15px">({$vo.add_time})</span>
						</li>
					</ul>
					</foreach>
					<if condition="$ping.id neq ''">
						<ul style="margin-top: 20px;margin-bottom: 20px">
							<li align="left" style="font-size:19px;">
								整体评价：{$ping.evaluation}星<br/>
								是否解决问题：	<if condition="$ping.is_solve eq 1"> 已解决 <else/> 未解决 </if><br/>
								评价内容：{$ping.feedback}<br/>
								<span style="font-size: 15px;">({$ping.add_time})</span>
							</li>
						</ul>
					</if>
					</thead>
				</table>
			</div>
			<if condition="$prom_list.status lt 3">
				<div style="margin-top:200px;">
					<textarea id="nei" style="width: 60%;height: 200px;font-size:21px;"> </textarea>
					<br/>
					<button onclick="TTT()" style="margin-left: 55%;width: 100px;height: 50px;font-size: 16px;color: #006DD9;margin-top: 20px"> 发送 </button>
				</div>
			</if>
		</div>
	</div>
</div>
<script>

	function TTT() {
	    var user_id = $('#user_id').val();
	    var wid = $('#wid').val();
	    var text = $('#nei').val();

        $.ajax({
            async: true, //请求是否异步，默认为异步，这也是ajax重要特性
            type : 'GET',
            url : "{:U('Invoice/ajaxWork')}",
            data : {
                'id':wid,
				'user_id':user_id,
				'text':text
			},
            dataType :'JSON',
            success : function(res){
                if(res == 1){
                    layer.msg('操作成功', {icon: 1});
                    window.location.reload();
                }else{
                    layer.msg('操作失败', {icon: 2,time: 2000});
                }
            }
        });
    }
</script>
</body>
</html>